<%@page language="Java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="includes/head.jsp" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Zmień hasło</title>
</head>
<body>
	<f:view>
		<span id="whole-page-wrapper">
			<div id="wrapper" align="center">
			<%@include file="includes/header.jsp" %>
			<%@include file="includes/menu.jsp" %>	
					
				<div id="content">
					<div id="inner-content">
					<c:if test="${sessionScope.user.loggedUser != null }">
						<br>
						<h:form>
							<h3>Podaj następujące dane:</h3><br>
							<div class="leftAlignedForm">
								<h4>Stare hasło:</h4>
								<fieldset>
									<h:inputSecret id="old_password" value="#{passBean.oldPass}" required="true" requiredMessage="Pole wymagane"/>
									<h:message for="old_password"></h:message>
								</fieldset>
								<h4>Nowe hasło:</h4>
								<fieldset>
									<h:inputSecret id="new_password" value="#{passBean.newPass}" required="true" requiredMessage="Pole wymagane"/>
									<h:message for="new_password"></h:message>
								</fieldset><br><br>
								<fieldset>
									<h:commandButton action="#{passBean.change}" value="Zmień hasło!" />
								</fieldset>
								<br>
						</div>
						</h:form>
					</c:if>
					<c:if test="${sessionScope.user.loggedUser == null }">
						Nie masz uprawnień do korzystania z tej strony!
					</c:if>
					</div>
				</div>
				<%@include file="includes/footer.jsp" %>
			</div>
		</span>
	</f:view>
</body>
</html>